//var ww_top = $(window).width();


function topc() {
        var ww_top = $(window).width();
        var hh_top = $(window).height();
        var headhh=ww_top*82/1920;
        $("#headdiv").css("height", headhh+"px");
        $("#headdiv div").css("line-height", headhh+"px");
        $(".saoyisao").css("line-height", "18px");
        $("#headdiv a").css({ "line-height": headhh+"px", "height": headhh+"px" });
        $("#headdiv .span2").css("top", (headhh-2)+"px");
        $("#ptdenglu").css("line-height",ww_top*35/1920+"px");
        $(".sdivtitle").css("padding-top", "" + parseInt(hh_top * 0.15) + "px");
        $(".sdiv2title").css("padding-top", "" + parseInt(hh_top * 0.18) + "px");
        $(".sdiv3title").css("padding-top", "" + parseInt(hh_top * 0.15) + "px");
        $(".sdiv4title").css("padding-top", "" + parseInt(hh_top * 0.18) + "px");
        $(".sdiv5title").css("padding-top", "" + parseInt(hh_top * 0.18) + "px");
        $(".sdiv6title").css("padding-top", "" + parseInt(hh_top * 0.13) + "px");
        $("#ptdenglu").css("margin-top",ww_top*20/1920+"px");
        $("#ptdenglu").css("width",ww_top*90/1920+"px");
        $("#ptdenglu").css("height",ww_top*35/1920+"px");
        $("#wxdiv").css("margin-top",ww_top*5/1920+"px");
        $(".sdiv1content1").css("padding-top", "" + parseInt(hh_top * 0.34) + "px");
        $(".sdiv1content2").css("padding-top", "" + parseInt(hh_top * 0.3) + "px");
        $(".sdiv2content1").css("padding-top", "" + parseInt(hh_top * 0.36) + "px");
        $(".sdiv3content").css("padding-top", "" + parseInt(hh_top * 0.61) + "px");
        $(".sdiv5content").css("padding-top", "" + parseInt(hh_top * 0.49) + "px");
        var url=window.location+"";
    	var index=url.lastIndexOf("/");
    	var str=url.substring(index+1,url.length);
    	if(str.indexOf("news")<0&&str.indexOf("about")<0){
    		$(".footer").css("height", "" + parseInt(hh_top * 0.1) + "px")
            $(".footerwz").css("padding-top","0");
    	}
    	$("#divcontent").css("margin-top", "" + parseInt(hh_top * 0.087) + "px");
    	var maincontent=$("#newsmain").width();
		$("#newsmain img").css("max-width",(maincontent-32)+"px");
		var jgheight=$("#jiange").height();
		$("#newstitle").css("max-height",jgheight+"px");
        $("#toYear").html(new Date().getFullYear());
    }

$(function(){
	$("#wxdiv").hover(
		function(){$("#wximg").attr("src","images/wx2_03.png")},
		function(){$("#wximg").attr("src","images/wx1_03.png")}
	)
	$(".loginbutton").hover(
			function(){$(this).css("background-color","#f08519")},
			function(){$(this).css("background-color","#ee7800")}
	)
	var url=window.location+"";
	var index=url.lastIndexOf("/");
	var str=url.substring(index+1,url.length);
	if(str.indexOf("news")<0&&str.indexOf("about")<0){
		$("#menuindex").addClass("span2");
	}
	if(str=="news" || str.indexOf("news_detail")>=0){
		$("#menunews").addClass("span2");
	}
	if(str=="about"){
		$("#menuabout").addClass("span2");
	}
	$("#wxdiv").mouseover(
        function () {
            var leftmargin = $(".weixinspan").position().left;
            var topmargin = $(".weixinspan").position().top;
            $("#weixindiv").css("left", "" + (parseInt(leftmargin) - 44) + "px");
            $("#weixindiv").css("top", "" + (parseInt(topmargin)+30) + "px");
            $("#weixindiv").show();
        }
    )
    $("#wxdiv").mouseout(
        function () {
            $("#weixindiv").hide();
        }
    )
    
    //$("#ptdenglu").css("margin-top",ww_top*20/1920+"px");
});
